package ar.edu.itba.it.paw.web.command;

import ar.edu.itba.it.paw.domain.User;

public class EditUserForm {

	private String username;
	private String first_name;
	private String last_name;
	private String old_password;
	private String new_password;
	private String rep_new_password;

	public EditUserForm(){
		
	}
	
	public EditUserForm(String username, String first_name, String last_name){
		this.username = username;
		this.first_name = first_name;
		this.last_name = last_name;
	}

	public void updateUser(User user){
		user.setFirst_name(this.first_name);
		user.setLast_name(this.last_name);
		if(!this.new_password.equals("")){
			user.setPassword(new_password);
		}
	}
	
	public void setFirst_name(String first_name) {
		this.first_name = first_name;
	}

	public String getFirst_name() {
		return first_name;
	}

	public void setLast_name(String last_name) {
		this.last_name = last_name;
	}

	public String getLast_name() {
		return last_name;
	}

	public void setOld_password(String old_password) {
		this.old_password = old_password;
	}

	public String getOld_password() {
		return old_password;
	}

	public void setNew_password(String new_password) {
		this.new_password = new_password;
	}

	public String getNew_password() {
		return new_password;
	}

	public void setUsername(String username){
		this.username = username;
	}
	
	public String getUsername() {
		return username;
	}

	public void setRep_new_password(String rep_new_password) {
		this.rep_new_password = rep_new_password;
	}

	public String getRep_new_password() {
		return rep_new_password;
	}
	
}
